using UnityEngine;
using System.Collections;

public class EnemyHealthController : MonoBehaviour {
	
	public float Health = 100;
	
	// Use this for initialization
	void Start () 
	{
	
	}
	
	// Update is called once per frame
	void Update () 
	{
		if(Health <= 0)
		{
			print (Health.ToString ());
			Destroy (this.gameObject);
		}
	}
	
	public void Damage(float dmg)
	{
		
		if(Health <= dmg)
		{
			Health = 0;
		}
		else 
		{
			Health -= dmg;
		}
	}
}
